import React from 'react';

export default function DemoScreen({ route, navigation }) {
    const label = route?.params?.label || '';
    const Component = route.params.Component;

    function onDismissExample() {
        navigation.goBack();
    }

    return <Component
        label={label}
        onDismissExample={() => onDismissExample()}
    />
}